// 统一的分类配置
export const CATEGORIES = [
  { id: 'all', name: '全部' },
  { id: '文学', name: '文学' },
  { id: '历史', name: '历史' },
  { id: '影视', name: '影视' },
  { id: '神话', name: '神话' },
  { id: '科幻', name: '科幻' },

]

export const getCategoryById = (id: string) => {
  return CATEGORIES.find(cat => cat.id === id)
}

export const getCategoryByName = (name: string) => {
  return CATEGORIES.find(cat => cat.name === name)
}
